package com.coldwindblows.blog.service;

import com.coldwindblows.blog.bo.CommentBo;
import com.coldwindblows.blog.pojo.CommentDo;
import com.github.pagehelper.PageInfo;

/**
 * 评论service
 * Created by ColdWindBlows on 2018/07/01
 *
 */
public interface ICommentService {
	/**
	 * 新增一条评论
	 * @param commentDo
	 * @return
	 */
	String insertComment(CommentDo commentDo);
	/**
	 * 
	 * @param cid
	 * @param page
	 * @param pageSize
	 * @return
	 */
	PageInfo<CommentBo> getComments(Integer cid, int page, int pageSize);
	/**
	 * 获取文章下的评论
	 * @param comment
	 * @param page
	 * @param pageSize
	 * @return
	 */
	PageInfo<CommentDo> getCommentsWithPage(CommentDo comment, int page, int pageSize);
	/**
	 * 根据主键查询评论
	 * @param coid
	 * @return
	 */
	CommentDo getDetail(Integer coid);
	/**
	 * 删除评论
	 * @param coid
	 * @param cid
	 * @return
	 */
	boolean deleteComment(Integer coid, Integer cid);
	/**
	 * 更新评论状态
	 * @param comment
	 * @return
	 */
	boolean updateComment(CommentDo comment);
}
